home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk6
/
6809xasm
/
6809.doc
next >
Wrap
Text File
|
1995-03-18
|
9KB
|
180 lines
6809 Cross Assembler for the Amiga
ALPHA Version x.08 - 8/14/88
THIS ALPHA VERSION IS FREE FOR PERSONAL USE ONLY AND YOU MAY PASS IT
ON TO ANOTHER PERSON OR TO ANY BBS, GROUP OR CLUB THAT WILL NOT SELL
THE PROGRAM IN ANY WAY WITHOUT SENDING A PERCENTAGE FOR EACH COPY TO ME.
THE ONLY CHARGE ALLOWED IS FOR ACTUAL COSTS OF DISTRIBUTION (ANNUAL BBS OR
CLUB DUES, DUPLICATION DISKS, AND THE LIKE).
Please send any comments or donations to the owner of this software:
Dave Casler
820 Blue Oak Dr.
Lewisville, Tx 75067
This is a brief discription of the 6809 cross assembler to be run on the
Amiga. This is an ALPHA version. This is the first release of this
assembler. It has been tested on a working 6809 program. Included with
this assembler is the source test files used to help debug the program.
They will also show that this assembler can handle all of the instructions
and all of the addressing modes of the 6809. With any luck I will get some
feedback on this so that I can go to the BETA version. After the BETA
version I will release a final(if this is possible) version. I will be
using this assembler as I have a project using the 6809 already started.
I think I can port this to other microprocessors without to much trouble
if anybody is interested.
The screen will not show the output listing if enabled unless you click
the window depth gadgets. What is shown is the field boxes. This was used
in de-bugging as it showed what the program thought the fields looked like.
In later version this will be moved to the background unless option
'd0x0004' is defined or there is an error. By default the only fields that
are displayed line by line are the 'File:', 'Include:' and 'Line #' fields.
A flag can be set to display all fields on pass2 (see 'Debug flags' below).
Program Startup:
asm [source_file_name] <options>
The source file name must end in ".a". You do not have to enter the
name with the ".a" as the program will add it if it finds it missing.
The options are listed below. You can also see the options by entering
asm[RETURN]. The options may be entered together or one at a time except
for the options that have parameters. Some examples follow the options.
a - Display all db/dw bytes.
By default the program will only display the first five bytes.
If the 'a' option is entered as many output lines as needed
will be used to display the data with 5 bytes per line.
d[f] - Debug flags.
This is used to enter the program into the debug modes. At
present the flags that can be entered are as follows.
0x0001 - Pause and display each line on pass 2
0x0004 - Display the lines on the screen.
0x0100 - Wait for operator to exit the program.
These flags have to be entered as an interger and can be
entered one at time or as one number.
h - Disable the HEX file output.
The HEX file is in Motorola S19 format.
l - Disable the listing.
This overrides the 'liston' and 'listoff' pseudo-ops.
m - Display the assembled macros (if not disabled by the 'l' option).
p - Disable the pause on errors.
By default the program will stop and display the line with
the error until the operator signals to continue.
s[n] - Change the Max symbol amount.
By default this is 500.
w - Wait for the operator to signal the program before exiting.
This is the same as the debug flag 0x0100.
Examples:
asm file_name hl
asm file_name h l
asm file_name h s1000
asm file_name d5 m
Output Listing:
The output is formatted for 132 column printer or an 80 column in condensed
mode. I found that there is no way to comment a program and fit it in 80
columns. The source file does not have to be formatted as this program will
format the output listing into the proper columns. AT PRESENT THE USE OF
TABS IN THE SOURCE HAS NOT BEEN TESTED. The output listing does not use
tabs. Also the output listing does not use formfeeds for paging. This is
done this way in the ALPHA version only as it helps in debugging. The out-
put listing is sent to 'stdout' (the screen unless redirected).
HEX File:
The HEX file name is the name of the source minus ".a" with ".HEX" added.
Macros:
At present the number of macros allowed is 20. The depth of the macros
(macro within a macro) is 9 plus the top level macro. A macro can not be
defined within another macro. Each macro can have up to 1000 characters
counting RETURNs. The macro name length(max) is 19 characters.
Labels/Symbols:
By default the max is 500. This can be changed by the 's' option on the
command line to anything above 100. The max length of each label/symbol
is 19 characters. The label/symbol can not start with a digit(0-9) or the
characters ^,$,%,!,#,+,-,*,/,\,(,),<,> or the comma.
Special Characters:
! or ^ - These are the NOT or COMPLEMENT characters and can be used on
integers or symbols as in !sym1, ^sym2 or !500.
+ - Add
- - Subtract
* - Multiply
/ - Divide
( ) - Grouping with a max level of 9 plus the top level.
$ - HEX
% - Binary
# - Immediate addressing
\ - Escape character, next character taken as is as in \A to get
the decimal value of the character 'A'.
$ - Present program or Data counter value.
< - Forced direct addressing.
> - Forced extended addressing.
Pseudo-ops:
cseg - Start code segment with optional value for the program
counter.
db - Define byte. More then one can be entered if separated by
a comma. The max source field is 25 characters counting
commas. (db 12,$34,%101,symbol)
ds - Data skip. Will advance the data or program counter
without storing any value.
dseg - Start data segment with optional value for the data counter.
This is useful for defining structures.
dseg 0
field1 ds 2
field2 ds 1
struct_name_SIZE equ $
struct_name ds struct_name_SIZE global area
leax struct_name,pcr
lda field1,x
dw - Define word. More then one can be entered if separated by
a comma. The max source field is 25 characters counting
commas. (dw 1234,$4567,%11001001,symbol)
ejec - End current page.
else - Used with the IF pseudo-ops.
endif - Used to end an IF.
endm - Used to end a macro definition.
equ - Define a label, see Labels/Symbols.
fcb - Same as 'db'.
fcw - Same as 'dw'.
if - Continue to assemble if value does not equal zero.
NEXT VERSION THIS WILL BE CHANGED TO IF SYMBOL IS DEFINED OR
VALUE DOES NOT EQUAL ZERO.
ifeq - Continue to assemble if value equals zero.
ifneq - Continue to assemble if value does not equal zero.
include - Include at this point a new source file. The program will add
".a" if it is not included in the file name. At the end of the
include file, continue on with the present file. There may be up
to 9 levels of include files plus the command line source file.
liston - Enable the output listing unless disable from the command line.
listoff - Disable the output listing unless already disabled from the
command line.
macro - Define a macro. There can be up to 10 parameters for each
macro for each macro call defined as %0-%9.
pushall macro
pshs d,x,y,u
endm
pushall example of use
loada macro
lda %0*10
endm
loada 5 example of use
opt - Enter option from a assembly source line. The 's' option
can not be set from this.
org - Set the program or data counter.
page _ same as 'ejec'.
setdp - Set the assembler direct page register. Used for automatic
direct page addressing. By default this equals 0.
ttl - Set the page heading title (max characters is 50).